<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Jetbrains-Help</title>
    <link href="/css/normalize.css" media="all" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="/css/index.css">
    <link href="https://www.jetbrains.com/favicon.ico" rel="icon">
    <script src="/js/jquery.js" type="text/javascript"></script>
    <script src="/js/index.js" type="text/javascript"></script>
</head>
<body>
<header class="tip sticky flex items-center py-6">
    <p>
        🇨🇳 下载 <a href="ja-netfilter" title="Download jetbra first">ja-netfilter.zip</a> , 然后配置
        你的JetBrains IDE(anything)'s <a onclick="showVmoptins()">IDE.vmoptions</a> 配置文件!<br>
        🇨🇳 当然你也可以 <a onclick="showLicenseForm()">重新定制激活授权</a> 用以自定义你的激活信息!</br>
    </p>
    <form style="margin-left: 50px;">
        <input type="text" class="search" id="search" placeholder="搜索IDE或者插件">
    </form>
</header>
<main id="product-list" class="px-6 z-grid py-10" style="--space: 20rem; --gutter: 3.5rem">
    <th:block th:fragment="product-list">
        <th:block th:each="product:${products}">
            <article class="card" th:data-product="${product.getName()}"
                     th:data-product-codes="${product.getProductCode()}">
                <header>
                    <div class="flex items-center justify-between px-6 pt-1 pb-0 bg-card radius-1">
                        <div class="avatar-wrapper flex items-center justify-center overflow-hidden shrink-0">
                            <div class="icon" th:classappend="${product.getIconClass()}" role="img"></div>
                        </div>
                        <button class="toggle text-grey text-sm align-right relative" th:data-version="${product.getVersion()}"
                                th:if="${product.getVersion()}">
                            <ul class="dropdown">
                                <li class="active"></li>
                            </ul>
                        </button>
                    </div>
                    <hr/>
                </header>
                <div class="pd-6 overflow-hidden bg-card container radius-1">
                    <h1 class="truncate truncate-1 color-primary mt-0 overflow-ellipsis" th:title="${product.getName()}"
                        th:text="${product.getName()}"></h1>
                    <p title="复制到剪贴板" class="truncate text-sm text-grey" onclick="copyLicense(this)"
                       data-content="复制到剪贴板">
                        *********************************************************************************************************************************************************
                    </p>
                </div>
                <div class="mask"></div>
                <div class="mask mask-c-1"></div>
            </article>
        </th:block>
        <th:block th:each="plugin:${plugins}">
            <article class="card" th:data-product="${plugin.getName()}"
                     th:data-product-codes="${plugin.getProductCode()}">
                <header>
                    <div class="flex items-center justify-between px-6 pt-1 pb-0 bg-card radius-1">
                        <div class="avatar-wrapper flex items-center justify-center overflow-hidden shrink-0">
                            <div class="icon" role="img"
                                 th:style="'background-image: url(' + ${plugin.getIcon()} + ')'"></div>
                        </div>
                    </div>
                    <hr/>
                </header>
                <div class="pd-6 overflow-hidden bg-card container radius-1">
                    <h1 class="truncate truncate-1 color-primary mt-0 overflow-ellipsis" th:title="${plugin.getName()}"
                        th:text="${plugin.getName()}"></h1>
                    <p title="复制到剪贴板" class="truncate text-sm text-grey" onclick="copyLicense(this)"
                       data-content="复制到剪贴板">
                        *********************************************************************************************************************************************************
                    </p>
                </div>
                <div class="mask"></div>
                <div class="mask mask-c-1"></div>
            </article>
        </th:block>
    </th:block>
</main>
<div id="mask"
     style="position:fixed;top:0;left:0;z-index:998;width:100%;height:100%;display:none;background-color:#000;opacity:0.5;overflow:hidden;"></div>
<div id="form" style="position:fixed;top:20%;left:40%;width:40%;height:500px;z-index:999;display:none;">
    <div class="form">
        <div class="title">授权信息</div>
        <div class="subtitle">欢迎你自定义</div>
        <div class="input-container ic1">
            <input id="licenseeName" class="input" type="text" placeholder=" "
                   th:value="${defaults.getDefaultLicenseName()}"/>
            <div class="cut"></div>
            <label for="licenseeName" class="placeholder">许可证名称</label>
        </div>
        <div class="input-container ic2">
            <input id="assigneeName" class="input" type="text" placeholder=" "
                   th:value="${defaults.getDefaultAssigneeName()}"/>
            <div class="cut"></div>
            <label for="assigneeName" class="placeholder">许可人名称</label>
        </div>
        <div class="input-container ic2">
            <input id="expiryDate" class="input" type="text" placeholder=""
                   th:value="${defaults.getDefaultExpiryDate()}"/>
            <div class="cut cut-short"></div>
            <label for="expiryDate" class="placeholder">过期时间</label>
        </div>
        <button class="submit" onclick="submitLicenseInfo(this)">确认</button>
    </div>
</div>
<div id="vmoptions" style="position:fixed;top:20%;left:29%;width:40%;height:500px;z-index:999;display:none;">
    <div class="form" style="width: 700px">
        <div class="title">Vmoptions</div>
        <div class="subtitle">Customization in idea.vmoptions</div>
        <div class="input-container ic1" style="height: 150px">
            <textarea class="input" cols="3" id="config" readonly style="resize:none">
                -javaagent:/(Your Path)/ja-netfilter/ja-netfilter.jar
                --add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
                --add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
            </textarea>
            <div class="cut"></div>
            <label class="placeholder" for="config">Config Text</label>
        </div>
        <button class="submit" onclick="$('#mask, #vmoptions').hide();">Close</button>
    </div>
</div>
</body>
</html>